def binarySearch(numbers, number):
    count = 0  # 比较次数计数器
    left, right = 0, len(numbers) - 1
    
    while left <= right:
        mid = (left + right) // 2
        count += 1  # 每次取中间值都进行一次比较
        if numbers[mid] == number:
            return count
        elif numbers[mid] < number:
            left = mid + 1
        else:
            right = mid - 1
    return count  # 未找到时返回总比较次数